<%@ include file="../confHeader.jsp" %>
<%@ include file="../mensagens.jsp" %>
<html>
<head>
	
</head>
<body>

 <html:form  action="usuarioAction" method="POST" onsubmit="return true;">
 	<html:hidden property="idUsuario" value="${to.idUsuario}"/> 	
 	
   <div class='pageForm'>
      <div class='formTitle'>  			
  			<bean:message key="user.entity"/>
      </div>        
        <div class='formField'>
            <label><bean:message key="user.name"/></label>: &nbsp;
            <bean:write name="to"  property="nome"  />
        </div>   
        
        <div class='formField'>
            <label><bean:message key="user.login"/></label>: &nbsp;
	         <bean:write name="to"   property="login"  />
        </div>       
        
         <div class='formField'>
            <label><bean:message key="user.role"/></label>: &nbsp;
             <bean:define id="credencial" name="to" property="credencial" toScope="request"/>  
         	  <bean:write name="credencial"   property="nome"  /> 
        </div>
        
         <div class='formField'>
            <label><bean:message key="user.construtora"/></label>: &nbsp;
              <bean:define id="construtora" name="to" property="construtora" toScope="request"/>  
         	  <bean:write name="construtora"   property="nome"  /> 
        </div>
        
        <hr size="1">
          <div class='formButton'> 
            <a onclick="javascript:alterar();" class="linkButton">  <bean:message key="app.button.update"/></a>          
         		&nbsp;  
      		<a onclick="javascript:remover();" class="linkButton">   <bean:message key="app.button.delete"/></a>          
         		&nbsp;
           	<a onclick="javascript:back()" class="linkButton">   <bean:message key="app.button.return"/></a> 
         </div>    
            
    </div>
    </html:form>
   
      
<script type="text/javascript">
 // <!--
   
  var action= '<html:rewrite page="/usuarioAction.do"/>';
  var nForm =  'UsuarioForm';

 function remover(){	 
	  if(confirm('<bean:message key="app.prompt.confirm.delete"/>')){
		 executeForm(nForm, action, 'remover');
	 }	 
 }
 
  function alterar(){	 
	 executeForm(nForm, action, 'goAltualizar');
 }
 
  //-->
</script>
</body>
</html>
